<template lang="">
    <div>
        <van-field v-model="form.name" label="名称" placeholder="请输入用户名" id='name' />
                    <van-button @click='add' id='add'>添加</van-button>    
    </div>
</template>
<script>
    export default {
        data(){
           return{
             form:{}
             }    
        },   
        methods: {
              add(){
                this.$axios.post('cateM',this.form).then(res=>{
                    if(res.data.code==200){
                         alert('添加成功')
                    }
                   
        })        }    
        },
        }
</script>
<style lang="">
    
</style>